<!--
=============COPYRIGHT============
Tin Book - An I-Read-This prototype for Tin Can API
Copyright (C) 2012  Andrew Downes

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
<http://www.gnu.org/licenses/>.

=============CREDITS============
Thanks to Rustici Software for provision of TCDriver.js which powers
the calls to the Tin Can API and for developing the Tin Can API
TCDriver.js is reproduced here by permission under the understanding that
it is still a prototype. It comes from the prototype package found at:
http://scorm.com/project-tin-can-phase-3-prototyping-tin-can-content-outside-of-the-lms/

=============DEVELOPMENT STATUS============
This software is currently in development and is NOT intended to be used
in a live situation.

-->
<!doctype html>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<html>
	<head>
		
		<meta name="viewport" content="width=600, initial-scale=1">
		<title>I Did This</title>
		<link rel="stylesheet" href="tinstatement.css" type="text/css" />
		<!-- jquery  
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>-->
		<script src="js-lib/jquery-1.7.1.min.js"></script>

		<!-- Rustici's Tin Can functions - call these to access the Tin Can API-->
		<script src="tincanjs/TinCan.js"></script>
		<script src="tincanjs/Utils.js"></script>
		<script src="tincanjs/Activity.js"></script>
		<script src="tincanjs/ActivityDefinition.js"></script>
		<script src="tincanjs/ActivityDefinition.js"></script>
		<script src="tincanjs/Agent.js"></script>
		<script src="tincanjs/AgentAccount.js"></script>
		<script src="tincanjs/Context.js"></script>
		<script src="tincanjs/Group.js"></script>
		<script src="tincanjs/InteractionComponent.js"></script>
		<script src="tincanjs/LRS.js"></script>
		<script src="tincanjs/Result.js"></script>
		<script src="tincanjs/Score.js"></script>
		<script src="tincanjs/State.js"></script>
		<script src="tincanjs/Statement.js"></script>
		<script src="tincanjs/StatementRef.js"></script>
		<script src="tincanjs/StatementsResult.js"></script>
		<script src="tincanjs/SubStatement.js"></script>
		<script src="tincanjs/Verb.js"></script>

		<!-- Base64 
		<script src="http://tin-can-can.googlecode.com/files/base64.js"></script>-->
		<script src="js-lib/base64.js"></script>

		<!-- TinCanCan - main js file for this wrapper -->
		<script src="TinStatement.js"></script>

	</head>
	<body >

		<h1>Statement Generator</h1>
		<p>
			This tool allows you to generate custom statements for version 0.95 of the Tin Can API.
		</p>

		<!-- <input type="button" value="Build URL" name="btnSave" id="templateURL" class="button"/>
		Navigate to a bookmarkable URL that autofills the above by querystring - only visible when Bookmark is not -->
		<!-- <input type="button" value="Bookmark" name="btnBookmark" id="templateURL" class="button"/>
		Bookmarks the saved page - only visible if page contains autofuilled fields. Hide when any field is changed.  -->

		<div class="section" id="lrs">
			<div class="background_div sevenEM">
				Dear LRS,
			</div>
			<h2>The LRS</h2>
			<p>
				Your LRS should provide the following information:
			</p>

		</div>

		<input type="button" value="+LRS" name="lrsLrsAdd" id="lrsLrsAdd" class="button" />
		<!--Add a blank LRS at the bottom-->
		<input type="button" value="-LRS" name="lrsLrsRemove" id="lrsLrsRemove" class="button displayNone"/>
		<!--Removes the first blank field (not neccessarily the bottom field)-->

		<div class="section" id="actor">
			<div class="background_div">
				I
			</div>

			<h2>Actor</h2>
			<p>
				Who is the statement about?
			</p>

			<table>
				<tr>
					<td class="label">objectType:</td>
					<td>
					<select name="actorObjectType" id="actorObjectType" class="required">
						<option value="Agent">Agent</option>
						<option value="Group">Group</option>
					</select></td>
				</tr>
			</table>
			
		</div>
		
		<input type="button" value="+Agent" name="actorAgentAdd" id="actorAgentAdd" class="button displayNone" />
		<!--Add a blank actor at the bottom-->
		<input type="button" value="-Agent" name="actorAgentRemove" id="actorAgentRemove" class="button displayNone"/>
		<!--Removes the first blank field (not neccessarily the bottom field)-->

		<div class="section" id="verb">
			<div class="background_div">
				Did
			</div>

			<h2>Verb</h2>
			<p>
				What action was taken?
			</p>
			<table>
				<tr>
					<td class="label">id:</td>
					<td>
					<input type="text" name="verbId" id="verbId" class="required verbId" />
					</td>
				</tr>
				<tr>
					<td  colspan="2" class="label label_heading">display:</td>
				</tr>

				<tr id="verbVerbDisplayButtonHolder">
					<td colspan="2" class="buttonHolder">
					<input type="button" value="+Lang" name="verbVerbDisplayAdd" id="verbVerbDisplayAdd" class="button" />
					<!--Add a blank field at the bottom-->
					<input type="button" value="-Lang" name="verbVerbDisplayRemove" id="verbVerbDisplayRemove" class="button"/>
					<!--Removes the first blank field (not neccessarily the bottom field)--></td>
				</tr>
			</table>

		</div>

		<div class="section" id="object">
			<div class="background_div">
				This
			</div>

			<h2>Object</h2>
			<p>
				What was done?
			</p>

			<table>
				<tr>
					<td class="label">objectType:</td>
					<td>
					<select name="objectType" id="objectType" class="required">
						<option value="Activity" selected="selected">Activity</option>
						<!--<option value="Interaction">Interaction</option>-->
						<option value="Agent">Agent</option>
						<option value="Group">Group</option>
						<!--<option value="SubStatement">SubStatement</option>
						<option value="StatementRef">StatementRef</option>-->
					</select></td>
				</tr>
			</table>
			<div id="activity" class="activitySubSection">
				<h3>Activity</h3>
				<table>
				<tr>
					<td class="label">id:</td>
					<td>
					<input type="text" name="activityId" id="activityId" class="required activityId" />
					</td>
				</tr>
				<tr>
					<td  colspan="2" class="label label_heading">definition:</td>
				</tr>
				<tr>
					<td class="label">type:</td>
					<td>
					<input type="text" name="activityType" id="activityType" class="required activityType" />
					</td>
				</tr>
				<tr>
					<td  colspan="2" class="label label_heading activityNameHeading">name:</td>
				</tr>
				<tr id="activityActivityNameButtonHolder">
					<td colspan="2" class="buttonHolder">
					<input type="button" value="+Lang" name="activityActivityNameAdd" id="activityActivityNameAdd" class="button" />
					<!--Add a blank field at the bottom-->
					<input type="button" value="-Lang" name="activityActivityNameRemove" id="activityActivityNameRemove" class="button"/>
					<!--Removes the first blank field (not neccessarily the bottom field)--></td>
				</tr>
				<tr>
					<td  colspan="2" class="label label_heading activityDescriptionHeading">description:</td>
				</tr>
				<tr id="activityActivityDescriptionButtonHolder">
					<td colspan="2" class="buttonHolder">
					<input type="button" value="+Lang" name="activityActivityDescriptionAdd" id="activityActivityDescriptionAdd" class="button" />
					<!--Add a blank field at the bottom-->
					<input type="button" value="-Lang" name="activityActivityDescriptionRemove" id="activityActivityDescriptionRemove" class="button"/>
					<!--Removes the first blank field (not neccessarily the bottom field)--></td>
				</tr>
				
				<tr>
					<td  colspan="2" class="label label_heading activityDescriptionHeading">extensions:</td>
				</tr>
				<tr id="activityActivityExtensionButtonHolder">
					<td colspan="2" class="buttonHolder">
					<input type="button" value="+Xtn" name="activityActivityExtensionAdd" id="activityActivityExtensionAdd" class="button" />
					<!--Add a blank field at the bottom-->
					<input type="button" value="-Xtn" name="activityActivityExtensionRemove" id="activityActivityExtensionRemove" class="button"/>
					<!--Removes the first blank field (not neccessarily the bottom field)--></td>
				</tr>
				
			</table>
			</div>
			<div id="objectAgent" class="displayNone agentSubSection">
				<h3>Agent</h3>
			</div>
			<input type="button" value="+Agent" name="objectAgentAdd" id="objectAgentAdd" class="button displayNone agentSubSection" />
			<!--Add a blank actor at the bottom-->
			<input type="button" value="-Agent" name="objectAgentRemove" id="objectAgentRemove" class="button displayNone agentSubSection"/>
			<!--Removes the first blank field (not neccessarily the bottom field)-->
			<div class="displayNone">
				<h3>SubStatement</h3>
			</div>
			<div class="displayNone">
				<h3>StatementRef</h3>
			</div>
		</div>

<input type="button" value="Send!" name="sendStatement" id="sendStatement" class="button"/>

		<noscript>
			This course requires JavaScript to be enabled in your browser. Please enable JavaScript, then relaunch the course.
		</noscript>
	</body>
</html>
